home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / bin / unInstallServer < prev    next >
Text File  |  1996-11-11  |  2KB  |  68 lines

  1. #!/bin/csh -f
  2.  
  3. #
  4. # update path to also look in the same directory from where this script
  5. # was executed from
  6. #
  7.  
  8. set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
  9. set DT_xconfirm = "$DT_utilities/DT_xconfirm"
  10.  
  11. set path = (${DT_util_path} $path)
  12.  
  13. #
  14. # find out and remember the user name
  15. #
  16.  
  17. if ($?HOME) then
  18.     set userName = $HOME
  19. else
  20.     $DT_xconfirm nohome
  21.     exit 0
  22. endif
  23.  
  24. # save a version of .dtcdresource in the home directory
  25.  
  26. tail +2 $userName/$DT_WWW_ROOT/.dtcdresource | sed -e 's/[     ][     ]*.*/ -1/' > $userName/.dtcdresource
  27.  
  28. #
  29. # clean up time
  30. #
  31.  
  32. if ( ! -e $userName/$DT_WWW_ROOT ) then
  33.     $DT_xconfirm warn "Server has not been installed."
  34. else 
  35.  
  36.     #
  37.     # remove file in /tmp
  38.     # have to rely on /tmp ???
  39.     #
  40.  
  41.     /usr/bin/rm -r /tmp/.userhome_`cat $userName/$DT_WWW_ROOT/logs/httpd.port`
  42.     /usr/bin/rm -r /tmp/.cdlocation_`cat $userName/$DT_WWW_ROOT/logs/httpd.port`
  43.     
  44.     #
  45.     # remove the $DT_WWW_ROOT environment
  46.     #
  47.  
  48.     #y#/sbin/mv $userName/$DT_WWW_ROOT/.netscape-preferences $userName/.save_pref
  49.     #y#/usr/bin/rm -rf $userName/$DT_WWW_ROOT
  50.     #y#/sbin/mkdir $userName/$DT_WWW_ROOT
  51.     #y#/sbin/mv $userName/.save_pref  $userName/$DT_WWW_ROOT/.netscape-preferences
  52.  
  53.     if ("$DT_WWW_ROOT" != "") /usr/bin/rm -rf $userName/$DT_WWW_ROOT
  54.  
  55.     # make sure the slate is clean
  56.     if ( -e $userName/$DT_WWW_ROOT ) then
  57.     $DT_xconfirm warn "Could not uninstall.\
  58.         Check permissions on $userName/$DT_WWW_ROOT"
  59.     endif
  60.     echo "$DT_SNAME WWW environment:          removed"
  61.     endif
  62.  
  63. #
  64. # clean up stuff in tmpdir
  65. #
  66.  
  67. exit 1
  68.